﻿using System;

namespace BorgExt
{
    internal class DelegateHandlerInfo : HandlerInfo
    {
        private readonly Delegate _delegate;
        private readonly object[] _args;

        public DelegateHandlerInfo(Delegate @delegate, params object[] args)
        {
            _delegate = @delegate;
            _args = args;
        }

        public override void Execute()
        {
            _delegate.DynamicInvoke(_args);
        }
    }
}

